---
apiVersion: v1
kind: ConfigMap
metadata:
  name: nginx-conf
data:
  nginx.conf: |
    events {
      worker_connections 768;
    }
    http {
      server {
        listen 80;
          location / {
              root   /app/static/momo-store;
              index  index.html index.htm;
              try_files $uri $uri/ /index.html;
          }

          location ~ ^/(categories|products|auth|metrics|orders)/ {
                  proxy_pass http://backend-momo-store:8081;
          }
      }
    }
